package ch.selise.archtool.lib.product.furniture;

import java.util.ArrayList;
import java.util.List;

public class FurnitureDAO {
	
	private static FurnitureDAO instance;
	private List<FurnitureUnit> availableFurnitures;
	
	private FurnitureDAO(){
		Chair chair = new Chair();
		Table table = new Table();
		Rack rack = new Rack();
		Bed bed = new Bed();
		availableFurnitures = new ArrayList<FurnitureUnit>();
		
		availableFurnitures.add(chair);
		availableFurnitures.add(table);
		availableFurnitures.add(bed);
		availableFurnitures.add(rack);
	}
	
	public static FurnitureDAO getInstance(){
		if(instance == null){
			instance = new FurnitureDAO();
		}
		
		return instance;
	}
	
	public List<? extends FurnitureUnit> getFurnitures()
	{
		return availableFurnitures;
	}

}
